package com.neuedu.hw20190214;

public class SalariedEmployee extends ColaEmployee {
    //成员变量
    private int salariedMon;

    //行为方法：计算固定工资
    public int getSalary(int month) {
        if(super.getBirthMonth()==month)
        {
            return salariedMon+100;
        }
        return salariedMon;
    }

    //有参构造方法
    public SalariedEmployee(String emName, int birthMonth, int salariedMon) {
        super(emName, birthMonth);
        this.salariedMon = salariedMon;
    }


    //setter和getter方法
    public int getSalariedMon() {
        return salariedMon;
    }

    public void setSalariedMon(int salariedMon) {
        this.salariedMon = salariedMon;
    }

}
